package com.lost.octopus.es.processor.scheduler.basic;

import com.lost.octopus.es.processor.constant.enums.LimitSyncSchedulerKeyEnum;
import com.lost.octopus.es.processor.dao.mapper.es.ResidentEsDao;
import com.lost.octopus.es.processor.dao.mapper.mybatis.ResidentMapper;
import com.lost.octopus.es.processor.entity.Resident;
import com.lost.octopus.es.processor.scheduler.EsSyncIntIndexOperator;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 * 人员标签同步类
 * @author zhangbh
 **/
@Component
@Log4j2
public class SyncResident extends EsSyncIntIndexOperator<Resident, ResidentMapper, ResidentEsDao> {


    @Override
    public LimitSyncSchedulerKeyEnum businessKey() {
        return LimitSyncSchedulerKeyEnum.SYNC_RESIDENT;
    }

    @XxlJob("FullSyncResident")
    public void fullSyncResident() {
        management.fullSync(this);
    }

}
